
<% if session[:user].ad_subscriptions.count > 0 %>
  <table>
    <tr>
      <td>
        <div id="subscription_ad_title">
          <%= render :partial => "ad_subscription_title", :locals => { :ad_subscriptions => session[:user].ad_subscriptions } %>
        </div>
      </td>
    </tr>
    <% session[:user].ad_subscriptions.each do |c| %>
      <tr>
        <td class="regulartext">
          <div id="subscription_ad_<%= c.id %>">
            Du bevakar annonsen
            <%= link_to c.ad.title, :controller => :ad, :action => :view, :id => c.ad %>,
            <%= link_to_remote 'Sluta bevaka', :update => "subscription_ad_#{c.id}", :url => { :action => "ad_subscription_remove", :id => c.id } %>
          </div>
        </td>
      </tr>
    <% end %>
  </table>
<% end %>